package com.mingyuan.library.provider.common.dto;

import java.io.Serializable;

/**
 * 分页参数
 */
public class PageParam extends Query implements Serializable {

    private static final long serialVersionUID = -7222885403342240084L;
    /**
     * 页码： 从1开始
     */
    protected int pageNum = 1;

    /**
     * 分页大小
     */
    protected int pageSize = 20;

    public PageParam() {
    }

    public PageParam(int pageNum, int pageSize) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }

    public int getPageNum() {
        return pageSize * (pageNum - 1);
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

}
